import instance from "@/utils/http.js"

export function getCategoryAPI () {
  return instance({
    url: '/home/category/head'
  })
}


/**
 * @description: 获取banner图
 * @param {*}
 * @return {*}
 */
// import  httpInstance  from '@/utils/http'
export function getBannerAPI (){
  return instance({
    url:'home/banner'
  })
}


export const findNewAPI = () => {
  return instance({
    url:'/home/new'
  })
}

export const getHotAPI = () => {
  return  instance.get('home/hot', {})
}

export const getGoodsAPI = () => {
  return instance({
    url: '/home/goods'
  })
}

export const getTopCategoryAPI = (id) => {
  return instance.get(
    '/category',{
      params:{
        id
      }
    }
  )
}

